@extends('layouts.before')


    @section('content')
      <div id="login-page">
        <div class="container">
        
            <form class="form-login" id="commentForm" method="post" action="{{ route('admin.login') }}">
                {{ csrf_field() }}

                <h2 class="form-login-heading">现在登录</h2>
                <div class="login-wrap">
                    <input type="text" class="form-control" name="email" data-rule-required="true" data-rule-email="true" data-rule-email="true"  placeholder="用户邮箱" autofocus value="{{ old('email') }}">
                 
                    <br>
                    <input type="password" class="form-control" name="password" data-rule-required="true" data-rule-maxlength="18"  data-rule-minlength="6" placeholder="密码">
                    <label class="checkbox">
                        <span class="pull-right">
                            <a data-toggle="modal" href="login.html#myModal"> 忘记密码?</a>
        
                        </span>
                    </label>
                    <button class="btn btn-theme btn-block"  type="submit"><i class="fa fa-lock"></i> 登录</button>
                    <hr>
                    @if($errors->has('email'))
                    <div class="alert alert-warning">
                        <a href="#" class="close" data-dismiss="alert">
                            &times;
                        </a>
                        <strong>警告！</strong>{{ $errors->first('email') }}。
                    </div>
                    @endif
                </form>   
                    <div class="login-social-link centered">
                    <p>其他登录</p>
                        <button class="btn btn-facebook" type="submit"><i class="fa fa-facebook"></i> qq</button>
                        <button class="btn btn-twitter" type="submit"><i class="fa fa-twitter"></i> 微信</button>
                    </div>
                    <div class="registration">
                        还没有帐号?<br/>
                        <a class="" href="#">
                            注册帐号
                        </a>
                    </div>
                    

                </div>
                  <!-- Modal -->
                  <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
                      <div class="modal-dialog">
                          <div class="modal-content">
                              <div class="modal-header">
                                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                  <h4 class="modal-title">忘记密码 ?</h4>
                              </div>
                              <div class="modal-body">
                                  <p>请填写您的邮箱找回密码.</p>
                                  <input type="text" name="email" placeholder="Email" autocomplete="off" class="form-control placeholder-no-fix">
        
                              </div>
                              <div class="modal-footer">
                                  <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
                                  <button class="btn btn-theme" type="button">提交</button>
                              </div>
                          </div>
                      </div>
                  </div>
                  <!-- modal -->
        
                    
        
        </div>
      </div>

@section('script')
    <script>
    $(document).ready(function() {
        $("#commentForm").validate({
            messages: {
                email: {
                    required: '*请填写邮箱',
                    email:"*请填写正确邮箱格式"
                },
                password:{
                    required: '*请填写密码',
                    minlength:'字符长度至少6位',
                    maxlength:'字符长度最多18位'
                }
            }
        });
    });
    </script>
@endsection


